package net.cassandraview.db;

import org.apache.cassandra.thrift.ConsistencyLevel;

/**
 * Configuration holder for connection manager. Contains host/port, optionally user/password and
 * a set of defaults such as read and write consistency etc. (see list of properties - they are self explainable)
 *
 * User: nagakhl
 * Date: 21.01.12
 * Time: 22:59
 */
public class DbManagerConfiguration {
    
    private String host;
    
    private int port;
    
    private String userName;
    
    private String password;

    private ConsistencyLevel readConsistency;

    private ConsistencyLevel writeConsistency;
    
    private int initialConnections;
    
    private int maxConnections;

    private int defaultLimit;
    
    private String defaultKeyspace;
    
    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public ConsistencyLevel getReadConsistency() {
        return readConsistency;
    }

    public void setReadConsistency(ConsistencyLevel readConsistency) {
        this.readConsistency = readConsistency;
    }

    public ConsistencyLevel getWriteConsistency() {
        return writeConsistency;
    }

    public void setWriteConsistency(ConsistencyLevel writeConsistency) {
        this.writeConsistency = writeConsistency;
    }

    public int getInitialConnections() {
        return initialConnections;
    }

    public void setInitialConnections(int initialConnections) {
        this.initialConnections = initialConnections;
    }

    public int getMaxConnections() {
        return maxConnections;
    }

    public void setMaxConnections(int maxConnections) {
        this.maxConnections = maxConnections;
    }

    public int getDefaultLimit() {
        return defaultLimit;
    }

    public void setDefaultLimit(int defaultLimit) {
        this.defaultLimit = defaultLimit;
    }

    public String getDefaultKeyspace() {
        return defaultKeyspace;
    }

    public void setDefaultKeyspace(String defaultKeyspace) {
        this.defaultKeyspace = defaultKeyspace;
    }
}
